package com.iwhalecloud.bss.kite.cucc.spec.impl.query;

import com.iwhalecloud.bss.kite.client.dto.spec.ObjAttrRstrRulDTO;
import com.iwhalecloud.bss.kite.dataservice.api.IQueryObjAttrRstrRulService;
import com.iwhalecloud.bss.kite.dataservice.bo.impl.QueryObjAttrRstrRulBO;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service("spec.queryObjAttrRstrRulService")
public class ObjAttrRstrRulQueryService implements IQueryObjAttrRstrRulService {

    @Resource
    private QueryObjAttrRstrRulBO queryObjAttrRstrRulBO;

    @Transactional(rollbackFor = Exception.class)
    @Override
    public List<ObjAttrRstrRulDTO> listOfferAttrRstrRuls(String offerId, boolean forward) {
        return queryObjAttrRstrRulBO.listOfferAttrRstrRuls(offerId, forward);
    }

    @Transactional(rollbackFor = Exception.class)
    @Override
    public List<ObjAttrRstrRulDTO> listProdAttrRstrRuls(String prodId, boolean forward) {
        return queryObjAttrRstrRulBO.listProdAttrRstrRuls(prodId, forward);
    }
}
